// ==UserScript==
// @name		Auto Access Google Analytics
// @author		Erik Vold
// @datecreated	2008-7-9
// @lastupdated	2009-06-29
// @namespace	autoAccessAnalytics
// @include		http*://google.com/analytics/
// @include		http*://www.google.com/analytics/
// @include		http*://google.ca/analytics/
// @include		http*://www.google.ca/analytics/
// @include		http://www.google.com/intl/cs/analytics/
// @include		http://www.google.com/intl/da/analytics/
// @include		http://www.google.com/intl/de/analytics/
// @include		http://www.google.com/intl/en_uk/analytics/
// @include		http://www.google.com/intl/en/analytics/
// @include		http://www.google.com/intl/es/analytics/
// @include		http://www.google.com/intl/fi/analytics/
// @include		http://www.google.com/intl/tl/analytics/
// @include		http://www.google.com/intl/fr/analytics/
// @include		http://www.google.com/intl/hu/analytics/
// @include		http://www.google.com/intl/id/analytics/
// @include		http://www.google.com/intl/it/analytics/
// @include		http://www.google.com/intl/ja/analytics/
// @include		http://www.google.com/intl/ko/analytics/
// @include		http://www.google.com/intl/nl/analytics/
// @include		http://www.google.com/intl/no/analytics/
// @include		http://www.google.com/intl/pl/analytics/
// @include		http://www.google.com/intl/pt-BR/analytics/
// @include		http://www.google.com/intl/pt-PT/analytics/
// @include		http://www.google.com/intl/ru/analytics/
// @include		http://www.google.com/intl/sv/analytics/
// @include		http://www.google.com/intl/th/analytics/
// @include		http://www.google.com/intl/tr/analytics/
// @include		http://www.google.com/intl/zh-CN/analytics/
// @include		http://www.google.com/intl/zh-TW/analytics/
// @version		1.2
// @description	Auto presses the "Access Analytics" button, if it is displayed.
// ==/UserScript==

autoAccessAnalytics = {};

autoAccessAnalytics.run = function(){
	window.location = document.evaluate("//a[@class='access_analytics']",document,null,9,null).singleNodeValue.href;

	return true;
}

// try to run the userscript
try{
	autoAccessAnalytics.run();
}
catch(e){}